<template>
    <div>
    <el-dialog v-model="dialogVisible" width="80%" align-center :show-close="false"
        draggable destroy-on-close>
        <template #header="{ close }">
            <div class="dialog-header flex justify-between items-center">
                <div>{{ title }}</div>
                <el-icon class="el-icon--left cursor-pointer" @click="close">
                    <CircleCloseFilled color="#fff" />
                </el-icon>
            </div>
        </template>
        <ClaimInfo :row="rowInfo" showCheckText/>
        <template #footer>
            <div class="dialog-footer">
                <div class="operate-btns">
                    <el-button type="primary" @click="dialogVisible = false">关闭</el-button>
                </div>
            </div>
        </template>
    </el-dialog>
    </div>
</template>

<script setup>
import ClaimInfo from "./ClaimInfo.vue";
import { getList} from "@/api/fee/rz/xmrzbl/index.js";
const dialogVisible = ref(false);
const rowInfo = ref({});
const title = computed(() => {
  return "项目入账查看";
});

const view = async (claimid) => {
    await initInfo(claimid);
    dialogVisible.value = true;
};
defineExpose({ view });

// 基础信息
const initInfo = async (claimid)=>{
    let params = {id:claimid,pageNum:1,pageSize:10};
    try {
        const res = await getList(params);
        if (res.code == 200) {
          rowInfo.value = res.rows[0];  
        }
    }catch (error) {
        console.log(error);
    }
}
</script>

<style scoped lang="scss">
@import url("@/views/fee/index.scss");
</style>